#pragma once
#include "../Token.h"
using namespace std;

#define _ARROWTYPE(Ty)  static_cast<const ArrowType&>(Ty)
#define _ATOMICTYPE(Ty)  static_cast<const AtomicType&>(Ty)
#define _ABSTRACTTYPE(Ty)  static_cast<const AbstractType&>(Ty)


class Type : public Token
{

public:
	typedef Type* pointer;
	typedef Type& reference;
	typedef const Type& const_reference;
	typedef pointer iterator;
	typedef AppObjectException exception;

public:
	virtual bool isAtomicType() 	const {return false;};
	virtual bool isAbstractType() 	const {return false;};
	virtual bool isArrowType() 	const {return false;};


public:
	//Token derived   
	bool isTerm()const{return false;};
	bool isType()const{return true;};
	string view() const;
	Token::pointer replaceAll(Token::const_reference, Token::const_reference) const;

public:
	virtual bool hasSubType(Type::const_reference Ty) const;

public:
	Type(const string& = "");
	Type(const_reference);		
	virtual ~Type();
};



